
import { Injectable } from '@angular/core';
import {HttpClient} from "@angular/common/http";


@Injectable()
export class HostService {
  constructor(private http: HttpClient){}
  results: string[];

  gethosts(){
    // return this.http.post('/host',{name:'vvvv'});
    return this.http.get('mock-data/hosts.json/');
  }

  getHero(id: number){
  console.log(id);
    return this.http.get('mock-data/host.json/');
  }

  matchHero(id: number){
    this.http.get('/')
  }
}
